//
//  RequestMessage.h
//  rmipclient
//
//  Created by bob on 16/1/5.
//  Copyright © 2016年 bob. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "RequestHeader.h"
#import "RequestBody.h"
#import "MesssageWrapperDelegate.h"
#import "HttpMesssageDelegate.h"


@interface RequestMessage : NSObject<MesssageWrapperDelegate>

@property(nonatomic, strong) NSString       *jsontext;
@property(nonatomic, strong) RequestHeader  *header;
@property(nonatomic, strong) RequestBody    *body;

///http请求代理
@property (nonatomic, weak) id<HttpMesssageDelegate>     delegate;

///构造函数
-(id)initWithFunc:(NSString *)func;
///构造函数
//-(id)initWithFunc:(NSString *)func Appcode:(NSString*)appcode;
///构造函数
-(id)initWithFunc:(NSString *)func authType:(NSInteger)authtype;

-(NSMutableDictionary*) getRequestMessageWithDictionary;

///转换JSON字串
-(NSString*)toJSON;
///解析JSON字串
-(BOOL)parse:(NSString *)s;

@end
